--- import { getCollection, type CollectionEntry } from "astro:content"; import Layout from "@/layouts/main.astro"; import { buttonVariants } from "@/components/ui/button"; import BlogPostCard from "@/components/BlogPostCard.astro"; import OpenRing from "@/components/OpenRing.astro"; export async function getStaticPaths() { const posts = await getCollection("blog"); return posts.map((post) => ({ params: { slug: post.id }, props: { post }, })); } interface Props { post: CollectionEntry<"blog">; } const { post } = Astro.props as Props; const { Content } = await post.render(); ---
Back to posts